package com.qdlc.p2p.common.util;

import javax.servlet.http.HttpServletRequest;

import com.qdlc.p2p.common.util.ip.IPUtil;

public class HttpRequestUtil {
 
	/**
	 * 判断是否是POST请求
	 * @param request
	 * @return
	 */
	public static boolean isPostMethod(HttpServletRequest request){
		String method = request.getMethod();
		if("post".equalsIgnoreCase(method)){
			return true;
		}
		return false;
	}
	
	/*private static ThreadLocal<String> ipLocal = new ThreadLocal<String>();
	
	public static String getIP(){
		return ipLocal.get();
	}
	
	public static void setIP(HttpServletRequest request){
		ipLocal.set(IPUtil.getRemortIP(request));
	}*/
	
}
